using Hangfire.Annotations;
using Hangfire.Dashboard;

namespace WeatherSystem.API.BackgroundJobs
{
    /// <summary>
    /// Hangfire Dashboard 授权过滤器
    /// </summary>
    public class HangfireDashboardAuthorizationFilter : IDashboardAuthorizationFilter
    {
        public bool Authorize([NotNull] DashboardContext context)
        {
            // 对于 Hangfire 1.8，直接返回 true 允许所有访问
            // 在实际生产环境中应该实现更严格的授权逻辑
            return true;
        }
    }
}